feat(agents): add built-in DeepResearch subagent#396
Merged
bobleer merged 1 commit intoGCWing:mainfrom Apr 13, 2026
Merged
Conversation
Adds DeepResearch as a built-in subagent using the Longitudinal +
Cross-sectional Analysis method for comprehensive research reports.
Key changes:
- Add `DeepResearchAgent` struct with curated tool set (WebSearch,
WebFetch, Read, Grep, Glob, LS, Write, Bash, TerminalControl,
TodoWrite) — Task tool explicitly excluded to prevent recursive
subagent calls
- Add `deep_research_agent.md` system prompt with incremental
research workflow: orient → plan → research-and-write per chapter →
synthesis, so context is never lost on long reports
- Register DeepResearch as a built-in SubAgent in AgentRegistry
alongside Explore and FileFinder
- Fix subagent tool confirmation deadlock: set `skip_tool_confirmation`
to `true` in ExecutionContext for all subagents, preventing indefinite
blocking when no user is present to confirm
- Add DeepResearch capability profile in frontend agents utils
(analysis:5, docs:5, creative:4, coding:3, ops:2)
Prompt design:
- Requires sourced/dated/attributed claims; unsourced claims must be
labeled (unverified) or (inferred)
- Saves full report to `{workspace}/deep-research/{slug}-{date}.md`
and returns only a 5-finding summary with a clickable file:// link
- Uses {ENV_INFO} placeholder so the agent knows the actual workspace
path and current date without guessing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DeepResearchas a built-in subagent (alongsideExploreandFileFinder) using the Longitudinal + Cross-sectional Analysis method to produce comprehensive, sourced research reportsChanges
Core — new built-in agent
deep_research_agent.rs:DeepResearchAgentstruct with a curated tool set (WebSearch,WebFetch,Read,Grep,Glob,LS,Write,Bash,TerminalControl,TodoWrite).Taskis explicitly excluded to prevent recursive subagent calls.deep_research_agent.md: system prompt implementing an incremental research workflow — orient → plan → research-and-write per chapter → synthesis — so context is never lost on long reports. Key constraints:(unverified)or(inferred){workspace}/deep-research/{slug}-{date}.mdvia{ENV_INFO}placeholder (correct workspace path and date, no guessing)file://hyperlink — not the full report bodymod.rs/registry.rs: registerDeepResearchAgentas a built-inSubAgentCore — subagent deadlock fix
coordinator.rs: setskip_tool_confirmation: trueinExecutionContextfor all subagents. Previouslyfalse, which caused subagents using permission-requiring tools (e.g.BashTool) to block indefinitely waiting for a confirmation channel that nobody would ever respond to.Frontend
utils.ts: addDeepResearchcapability profile (analysis: 5,docs: 5,creative: 4,coding: 3,ops: 2)Test plan
cargo build -p bitfun-corecargo test -p bitfun-core deep_researchTasktool completes without hanging{workspace}/deep-research/with correct datefile://link (not a code block)